With Preemption Process Logic,
Normally, if an entity or downtime attempts to preempt an entity that is using a location, the location is immediately preempted (assuming it is preemptable). Once the location finishes the preempting activity, the original preempted entity regains possession of the location and resumes processing where it left off.
To override this default preemption procedure, in the case of entities that are preempted by another entity or a downtime,
The Preemption Process Record, allows you to control if and when the location is given up. In the case of a preemptive request for a location, the preemption process record allows the entity to be routed elsewhere if desired. If a preemption process is defined, the actual preemption does not occur until the preemption process explicitly frees the location.
After the location is given up, the entity may (1) elect to use an alternative location to complete the process, or (2) seek to regain access to the same location to complete the process.
While an entity is executing a preemption process, it cannot be preempted by any other entity or downtime.
How to create a preemption process record:
Please Note: When a preemption occurs, the entity looks forward and then from the beginning of the process list trying to find a preemption process that matches the same entity and location (a process with ALL as the entity name will match any entity). If a match is found, the preemption process gets executed. Otherwise the default preemption occurs. Only the first preemption process encountered will be executed in the event that multiple preemption processes are defined with the same entity and location names.
Several circumstances can be created through the use of preemption process records. An entity delaying a preemption, for example, may find at the conclusion of the delay that the preemption is no longer required, or that it faces an even higher preemption priority.
In cases where an entity has multiple locations or resources from which to choose, a preemptive request for any one of them is not necessarily a commitment to select that particular location. If any of the alternative locations becomes available, the entity will select it and withdraw the preemption request.
The Preemption Process Logic feature includes the following functions for use in the preemption logic.
PREEMPTOR() Identifies whether a downtime or entity is making the preemptive request. It returns a 0 if the preemptor is a downtime, otherwise it returns the index number of the preempting entity.
TIMELEFT() Returns the amount of time remaining if the preemption occurred during a WAIT or USE statement. It returns a time value in default time units (real). If multiple entities are preempted from a location, it returns the longest remaining time for all of the entities.
Please Note: The values returned by these functions must be checked before any processing delay occurs since they are updated whenever a preemption takes place. If the values must be referred to later, they should be assigned to the entity’s attribute or to a local variable.
In this example, a Gear may be preempted in its occupancy of the Lathe. This preemption may be because of either a preempting entity or downtime. Before the actual preemption takes place, the operation time for the Gear is interrupted and the Gear immediately begins processing the operation logic defined in the preemption process.
In the preemption process, the remaining operation time is stored in Attr1. The Gear routes to Lathe_Backup where it finishes processing. Because the backup lathe is not as efficient as the other Lathe, it takes 50% longer to process the Gear on Lathe_Backup. Therefore, we multiply the time left to process the Gear by a factor of 1.5.
Process Table
Entity... |
Location... |
Operation (min)... |
Gear |
Lathe |
WAIT 10 min |
Gear |
Lathe |
Attr1=TIMELEFT() |
Gear |
Lathe_Backup |
WAIT Attr1*1.5 |
Routing Table
Blk |
Output... |
Destination... |
Rule... |
Move Logic... |
1 |
Gear |
Mill |
FIRST 1 |
|
1 |
Gear |
Lathe_Backup |
FIRST 1 |
|
1 |
Gear |
Mill |
FIRST 1 |
|
© 2012 ProModel Corporation • 556 East Technology Avenue • Orem, UT 84097 • Support: 888-776-6633 • www.promodel.com |